package com.example.dessert.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;

import java.util.Date;

/**
 * @ClassName: Product
 * @Description:
 * @Author
 * @Date 2022/1/11
 * @Version 1.0
 */
public class Product {

    private Long id;
    private Long categoryId;
    private String name;
    private String picture;
    private Integer price;
    private Integer newArrival;
    private Integer recommend;
    private Integer disabled;
    private String content;

    //插入时自动填充
    @TableField(fill = FieldFill.INSERT)
    private Date createdAt;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updatedAt;

    public Long getId() {
        return id;
    }

    public Long getCategoryId() {
        return categoryId;
    }

    public String getName() {
        return name;
    }

    public Integer getPrice() {
        return price;
    }

    public String getPicture() {
        return picture;
    }

    public Integer getNewArrival() {
        return newArrival;
    }



    public Product setName(String name) {
        this.name = name;
        return this;
    }

    public Product setPrice(Integer price) {
        this.price = price;
        return this;
    }


}